dsh-capitalize: Capitalize the First Letter
The DeepSeek Harness (DSH) plugin dsh-capitalize is a string-processing tool implemented purely in Node.js. It is designed to apply formatting adjustments to text generated by agents and does not rely on network requests. The plugin is maintained by uckkk and is released under the MIT license. Users can install it using `dsh plugin add github:uckkk/dsh-capitalize`. Once installed, it can be invoked directly in a conversation. It depends on `@deepseek-ai/cordis` (^4.0.1) and `@deepseek-ai/dsh-tools` (>=0.1.0-rc.6).
Read Moredsh-text-tools: String Processing and Statistics Tools
`dsh-text-tools` is a pure Node.js plugin maintained by uckkk, designed to address the need for local text processing in DSH agent development. The plugin runs without an internet connection and provides two core features: string style conversion (supporting case, camelCase, snake_case, kebab-case, and Slug formats) and text statistics (characters, words, lines, and bytes). Users can install it using `dsh plugin add` and enable it in their profile. To use it, simply call the registered tool functions, such as `text_transform`. Because the plugin involves running third-party code locally, please review the source code before use to ensure security and compliance.
Read Moredsh-lowercase: A Pure Node.js Lowercase Conversion Plugin
The core design of the DeepSeek Harness plugin dsh-lowercase is “everything is a plugin,” aiming to provide lightweight string transformation capabilities. Maintained by developer uckkk, the plugin is implemented in pure Node.js with no network dependencies and only offers the functionality of converting strings uniformly to lowercase. The installation command is `dsh plugin add github:uckkk/dsh-lowercase`, making it suitable for scenarios that require quick local text formatting. It is recommended to review the source code and MIT license before installation.
Read MoreSuffix Array: What is a Suffix Array? A Powerful Tool for Solving String Problems
Suffix array is an array that stores the starting positions of suffixes sorted lexicographically. A suffix is a substring starting from each position in the string to the end (e.g., for "banana", the suffixes are "banana", "anana", etc.). The lexicographical comparison rule is: compare the first different character by its size; if the characters are the same, compare subsequent characters in order; if one suffix is a prefix of the other, the shorter one is considered smaller. Taking "abrac" as an example, the sorted suffix starting positions array is [0, 3, 4, 1, 2] (e.g., the suffix starting at position 0 "abrac" is less than the one at position 3 "ac", and they are arranged in this order). The core value of suffix arrays lies in efficiently solving string problems: by leveraging the close relationship (long common prefix length) between adjacent suffixes after sorting, it can quickly handle tasks such as finding the longest repeated substring and verifying substring existence. For example, the LCP array can be used to find the longest repeated substring, or binary search can verify if a substring exists. In summary, the suffix array provides an efficient solution for string problems by sorting suffix starting positions and is a practical tool for string processing.
Read MoreC++ String Type Basics: String Operations and Common Methods
The C++ string class is a core tool for handling strings, safer and more user-friendly than C-style character arrays, avoiding memory management issues. It requires including the `<string>` header and using the `std` namespace. **Definition and Initialization**: Strings can be directly assigned (e.g., `string s = "Hello"`), constructed via constructor (e.g., `string s3("World")`, `string s4(5, 'A')`), or initialized as empty strings. **Basic Operations**: `size()`/`length()` retrieve the length (return `size_t`). Characters can be accessed with `[]` (unboundsafe) or `at()` (boundsafe). Concatenation is done via `+`, `+=`, or `append()`. **Common Methods**: `find()` searches for substrings (returns position or `npos`), `replace()`, `insert()`, `erase()`, `compare()`, and `clear()` (empties the string). **Conversion**: Convert `string` to `const char*` with `c_str()`, and `const char*` to `string` via direct construction or assignment. **Notes**: Avoid mixing C string functions. `size_t` is unsigned (watch for comparisons with negative values), and `empty()` checks for empty strings. (Word count: ~190)
Read More